<div class="events index">
    <h2><?php echo __('Registered'); ?></h2>
    <p>Total registered: <?= count($event)?></p>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th>Name</th>
            <th>Email</th>
            <th>Date</th>
            <th>On hold</th>
            <th class="actions"><?php echo __('Actions'); ?></th>
        </tr>
    
    <?php foreach($event as $reg): ?>
        <tr>
            <td><?php echo h($reg['User']['name']); ?>&nbsp;</td>
            <td><?php echo h($reg['User']['email']); ?>&nbsp;</td>
            <td><?php echo h($reg['Registration']['created']); ?>&nbsp;</td>
            <td class="<?= $reg['Registration']['onhold'] ? 'red' : 'green' ?>"><?= $reg['Registration']['onhold'] ? 'Yes' : 'No'?></td>
            <td>todo</td>
        </tr>
    <?php endforeach; ?>
    </table>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('List Events'), array('controller' => 'events', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Event'), array('controller' => 'events','action' => 'add')); ?></li>
        <li><?php echo $this->Html->link(__('List Chapters'), array('controller' => 'chapters', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Chapter'), array('controller' => 'chapters', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
    </ul>
</div>